import Vue from 'vue';
import Vuex from 'vuex';
import user from './modules/user';


Vue.use(Vuex);

const store = () => new Vuex.Store({
  state: {
  },
  actions: {
    //刷新保持登陆状态
    async nuxtServerInit({ dispatch }) {
        await dispatch('user/getUser')
    }

  },
  modules:{
    user
  }
});

export default store
